package com.ruoyi.resp;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
// 地点设备统计类
public class LocationDeviceStats {
    private String name; // 地点名称
    private List<DeviceTypeCount> list; // 设备类型统计列表

    public LocationDeviceStats(String name) {
        this.name = name;
        this.list = new ArrayList<>();
    }

    // Getter 和 Setter
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<DeviceTypeCount> getList() {
        return list;
    }

    public void setList(List<DeviceTypeCount> list) {
        this.list = list;
    }

    // 添加设备类型统计
    public void addDeviceTypeCount(String type, int count) {
        this.list.add(new DeviceTypeCount(type, count));
    }
}